extend ./layout/default

block main-content
  .panel
    .header
      span.topic-tab.current-tab(type="datasets") data
      span.topic-tab(type="users") user
    .list
      each cheatsheet in datasets    
        .cscell.datasets
          a(href="/dataset/#{cheatsheet._id}").title #{cheatsheet.title}
          //- span.pull-right.starcount #{cheatsheet.starcount}
          //- span.pull-right.staricon
          p.descr #{cheatsheet.description}
      each u in users
        .cscell.users.hidden
          svg(width="40" height="40" data-jdenticon-hash="#{u.hashId}")
          a.title(href="/user/#{u.name}") #{u.name}
          span     #{u.activated ? 'certified' : 'not certified'}
          p.descr email: #{u.email}
          
          
  script.
    $('.topic-tab').click(function(){
      $('.topic-tab').removeClass('current-tab')
      $(this).addClass('current-tab')
      if($(this).attr('type')=='users'){
        $('.datasets').addClass('hidden')
        $('.users').removeClass('hidden')
      }else if($(this).attr('type')=='datasets'){
        $('.users').addClass('hidden')
        $('.datasets').removeClass('hidden')
      }
    })
      
      
